#pragma once

#include <string>

namespace JCC
{
#define JCC_START int\
	_jcc_start;

#define JCC_END virtual\
	void\
	JCCEnd()\
	{\
		_jcc_start_addr = (unsigned long)(&_jcc_start);\
		_hpp_file = __FILE__;\
	}

	class CJCBaseConvertor
	{
	public:
		CJCBaseConvertor(void);
		CJCBaseConvertor(const CJCBaseConvertor& val);
		~CJCBaseConvertor(void);

		CJCBaseConvertor& operator=(const CJCBaseConvertor& val);

		bool ToObject(std::string json_);

		std::string ToJson();

	protected:
		virtual void JCCEnd() = 0;

	protected:
		unsigned long _jcc_start_addr;

		std::string _hpp_file;

	private:
		void* _parser_tool;

		void* _convertor_tool;
	};
}

